package cn.seocoo.platform.base.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.seocoo.platform.base.mapper.BaseBrandMapper;
import cn.seocoo.platform.base.domain.BaseBrand;
import cn.seocoo.platform.base.service.IBaseBrandService;
import cn.seocoo.platform.common.core.text.Convert;

/**
 * 品牌 服务层实现
 * 
 * @author wujian
 * @date 2019-12-25
 */
@Service
public class BaseBrandServiceImpl implements IBaseBrandService 
{
	@Autowired
	private BaseBrandMapper baseBrandMapper;

	/**
     * 查询品牌信息
     * 
     * @param id 品牌ID
     * @return 品牌信息
     */
    @Override
	public BaseBrand selectBaseBrandById(Integer id)
	{
	    return baseBrandMapper.selectBaseBrandById(id);
	}
	
	/**
     * 查询品牌列表
     * 
     * @param baseBrand 品牌信息
     * @return 品牌集合
     */
	@Override
	public List<BaseBrand> selectBaseBrandList(BaseBrand baseBrand)
	{
	    return baseBrandMapper.selectBaseBrandList(baseBrand);
	}
	
    /**
     * 新增品牌
     * 
     * @param baseBrand 品牌信息
     * @return 结果
     */
	@Override
	public int insertBaseBrand(BaseBrand baseBrand)
	{
	    return baseBrandMapper.insertBaseBrand(baseBrand);
	}
	
	/**
     * 修改品牌
     * 
     * @param baseBrand 品牌信息
     * @return 结果
     */
	@Override
	public int updateBaseBrand(BaseBrand baseBrand)
	{
	    return baseBrandMapper.updateBaseBrand(baseBrand);
	}

	/**
     * 删除品牌对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteBaseBrandByIds(String ids)
	{
		return baseBrandMapper.deleteBaseBrandByIds(Convert.toStrArray(ids));
	}
	
}
